package com.example.haojiutao.mapper;


import com.example.haojiutao.model.domain.Comment;
import com.example.haojiutao.model.vo.response.CommentGoodsDetailVO;
import com.example.haojiutao.model.vo.response.CommentOrderDetailVO;
import com.example.haojiutao.model.vo.response.OrderGoodsDetailVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
/**
 * @Description: 添加删除评论
 * @Author: zhou_yuan
 * @CreateTime： 2024/1/20 15:59
 */
@Mapper
public interface CommentMapper {

    /*
     * @Description: 评论收藏
     * @Author: zhou_yuan
     * @CreateTime： 2024/1/20 16:00
     * @param: null
     * @return: null
     **/


    Integer insertComment(Comment comment);

    /*
     * @Description: 删除评论
     * @Author: zhou_yuan
     * @CreateTime： 2024/1/20 16:01
     * @param: goodsId
     * @return: int
     **/
    Integer deleteById(int goodsId);

    /*
     * @Description: //分页列表查询评论
     * @Author: zhou_yuan
     * @CreateTime： 2024/1/20 16:03
     * @param: comment
     * @return: java.util.List<com.example.haojiutao.model.domain.Comment>
     **/
    List<Comment> selectListByUser(Comment comment);

    /*
     * @Description: 根据用户ID查询用户评论
     * @Author: zhou_yuan
     * @CreateTime： 2024/1/20 16:05
     * @param: userId
     * @return: java.util.List<com.example.haojiutao.model.domain.Comment>
     **/
    List<Comment> selectByUserIdComments(String userName);

    /*
     * @Description: 根据id查询
     * @Author: zhou_yuan
     * @CreateTime： 2024/1/20 16:08
     * @param: commentId
     * @return: com.example.haojiutao.common.Result
     */
    Comment selectById(int commentId);

    CommentGoodsDetailVO selectByCommentId(Integer commentId);

    Integer selectCountByOrder(Integer GoodsId);

    List<OrderGoodsDetailVO> selectBeforeComment(OrderGoodsDetailVO order);

    List<CommentGoodsDetailVO> selectReComment(CommentGoodsDetailVO comment);

}
 
